<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" />
<meta name="description" content="建筑安装行业资讯频道为您带来行业最新的新闻、消息和政策等，让您不出门就可以了解建筑安装行业的动态，掌握第一手资讯。">
<meta name="keywords" content="建筑安装行业资讯,建筑安装行业新闻,建筑安装行业消息,建筑安装行业政策,安装通">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<title>建筑安装行业资讯_安装通 </title>
<link href="/res/css/mall/mallIndex.css" rel="stylesheet">
<link href="/res/css/respective/info/info.css" rel="stylesheet"> 
</head> 
[#assign link="infoIndex"/]
<body>
	 [#include "/front/common/front_headMal.html"]
	 <div class="infoOuter">
	 	<div class="w1200">
	 		<div class="left">
			[@advertise_template code='INFO_INDEX_ADV' /]
	 			<div class="iterm2">
	 				[#list  recommendInfo as content]
	 						<a href="/content/detail/${content.id!}" [#if content_index==0]style="margin-left: 0;"[/#if]>
			 					<img alt="" src="${content.titleImg!}" [#if content_index==0]style="margin-left: 0;"[/#if]>
			 					<p class="intro">${content.title!}</p>
			 				</a> 
	 				[/#list]
	 			</div>
	 			<div class="iterm3">
	 				<div style="padding-bottom: 0px;border-bottom: none;height: 50px;background-color: #f2f2f2;">
	 					<ul class="tab">
	 						[#list menu as channel]
	 							[#if channel_index==0]
	 								<li class="on" data-cid="${channel.id!}">${channel.channelName!}</li>
	 							[/#if]
	 							[#if channel_index==1]
	 								<li data-cid="${channel.id!}">${channel.channelName!}</li>
	 							[/#if]
	 							[#if channel_index==2]
	 								<li data-cid="${channel.id!}">${channel.channelName!}</li> 
	 							[/#if]
	 						[/#list]
		 				</ul>
		 				<a id="tab_more" class="more" style="margin-top: 15px;margin-right: 15px;">更多>></a>
	 				</div> 
	 				
	 			</div>
	 			<div id="page"></div> 
	 		</div>
	 		[#include "/front/info/infoRight.html"]
	 	</div>
	 </div>
	 [#include "/front/common/front_foot.html"]
</body>
<script type="text/javascript" src="/res/js/common/jquery.1.9.1.min.js"></script>
<script type="text/javascript" src="/res/third/layer/layer.js"></script>
<script src="/res/js/common/jquery.ellipsis.js"></script>
<script type="text/javascript" src="/res/third/laypage/laypage.js"></script>
<script type="text/javascript">
laypage.dir = '/res/third/laypage/skin/aztpage.css';
var banSz=$(".left .iterm1").children("img").size()-2;//baner个数
var banI=0;//偏移步数，0:第一张,banSz-1:末张
	function pre(){ 
		if(banI==0){//当前第一张
			banI=banSz-1;//末张 
		}else{
			banI++;
		}
		$(".left .iterm1 div img").fadeOut();
		$(".left .iterm1 div img").eq(banI).fadeIn();
	}
	function next(){ 
		if(banI==(banSz-1)){//当前第一张
			banI=0//首张 
		}else{
			banI--;
		}
		$(".left .iterm1 div img").fadeOut();
		$(".left .iterm1 div img").eq(banI).fadeIn();
	}
	
	var channelId='${so_channelId!}';
	
	function initIndexPage(pageindex,channelId){
		var layerIndex;
		$.ajax({
	        url : '/content/contentIndexPage',
	        type : 'post',
	        data:{pageIndex:pageindex,channelId:channelId},
			beforeSend : function () {
				layerIndex = layer.load(1, {
					  shade: [0.1,'#fff'] 
					});
	        },
	        success : function(data) {
	        	 if(data){
	            	 $(".iterm3").find(".list").remove();
	            	 $(".iterm3").append(data);
	             }else{
	            	 layer.alert("数据错误");
	             }
	        },
			complete : function() {
				layer.close(layerIndex);
			}
	    })
	}
	initIndexPage(1,channelId);
	
	$(function() {
		$(".tab li").click(function(){
			$(this).siblings("li").removeClass("on");
			$(this).addClass("on");
			channelId=$(this).attr("data-cid");
			initIndexPage(1,channelId);
		});
		
		$("#tab_more").click(function(){
			$(".tab li").each(function(){
				if($(this).hasClass("on")){
					location.href="/content/list/"+$(this).attr("data-cid");
				}
			});
		});
	})
</script>
</html>
